<!--<h1 class="show_title" style="text-align: center">OUR PHILOSOPHY</h1>
<table id="philo" style="margin: 0 auto;">
	<tr>
		<td>don't repeat yourself</td>
		<td>don't reinvent the wheel</td>
		<td>be more productive</td>
	</tr>
	<tr>
		<td><img src="/images/repetition.jpg" alt="repeat" /></td>
		<td><img src="/images/wheel.jpg" alt="wheel" /></td>
		<td><img src="/images/productive.png" alt="productive" /></td>
	</tr>
</table>-->

<h1 class="show_title" style="text-align: center; margin-bottom: -5px;">your centralized code repository</h1>
<table id="philo" style="margin: 0 auto;">
	<tr>
		<td style="border-right: 20px solid white">don't repeat yourself</td>
		<td style="border-right: 20px solid white">don't reinvent the wheel</td>
		<td>be more productive</td>
	</tr>
	<!--<tr>
		<td><img src="/images/repetition.jpg" alt="repeat" /></td>
		<td><img src="/images/wheel.jpg" alt="wheel" /></td>
		<td><img src="/images/productive.png" alt="productive" /></td>
	</tr>-->
</table>

<br /><br />

<% form_tag :search, :id => "search_forma", :url => {:action => "index"} do %>
  <%= text_field :search, :text, :size => 50  %>
  <%= submit_tag 'Search', :class => "default_button_class" %>
<% end %>
<br /><br /><br />
<div id="pomembni">
	<div id="levo">
		<table class="firstpage_table">
			<caption>MOST POPULAR</caption>
			<tr>
				<th>Code</th>
				<th>Popularity</th>
			</tr>
			<% for code in @top_5 %>
			<tr>
				<td>
					<%= link_to code.title, code %>
				</td>
				<td class="drugi_stolpec">
					<%= code.popularity %>
				</td>
			</tr>
			<% end %>
		</table>
	</div>
	
	<div id="desno">
		<table class="firstpage_table">
			<caption>LAST COMMENTS</caption>
			<tr>
				<th>Code</th>
				<th>Author</th>
				<th>Time ago</th>
			</tr>
			<% for comment in @top_5_comments %>
				<tr>
					<td>
					<% code = Code.find comment.code_id %>
					<% author = User.find comment.user_id %>
					<%= link_to code.title, code %>
					</td>
					<td style="text-align: center"><%= link_to author.username, 'users/'+author.username %></td>
					<td class="drugi_stolpec">
					<%= distance_of_time_in_words(Time.now,comment.updated_at) %>	
					</td>
				</tr>
			<% end %>
		</table>
	</div>
	<div style="clear:both"></div>
</div>
